home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / ma11 / ma.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1995-05-08  |  29.6 KB  |  921 lines

  1. VERSION 2.00
  2. Begin Form maForm 
  3.    BackColor       =   &H00808000&
  4.    BorderStyle     =   1  'Fixed Single
  5.    Caption         =   "Memory Alert 1.1"
  6.    ClientHeight    =   3315
  7.    ClientLeft      =   2595
  8.    ClientTop       =   2265
  9.    ClientWidth     =   3420
  10.    Height          =   3720
  11.    Icon            =   MA.FRX:0000
  12.    Left            =   2535
  13.    LinkMode        =   1  'Source
  14.    LinkTopic       =   "Form1"
  15.    MaxButton       =   0   'False
  16.    ScaleHeight     =   3315
  17.    ScaleWidth      =   3420
  18.    Top             =   1920
  19.    Width           =   3540
  20.    Begin Frame Frame1 
  21.       BackColor       =   &H00808000&
  22.       FontBold        =   0   'False
  23.       FontItalic      =   0   'False
  24.       FontName        =   "MS Sans Serif"
  25.       FontSize        =   8.25
  26.       FontStrikethru  =   0   'False
  27.       FontUnderline   =   0   'False
  28.       Height          =   1815
  29.       Left            =   60
  30.       TabIndex        =   6
  31.       Top             =   1440
  32.       Width           =   3300
  33.       Begin PictureBox Picture1 
  34.          BackColor       =   &H00000000&
  35.          BorderStyle     =   0  'None
  36.          ForeColor       =   &H00404080&
  37.          Height          =   12
  38.          Left            =   1248
  39.          ScaleHeight     =   15
  40.          ScaleWidth      =   2025
  41.          TabIndex        =   39
  42.          Top             =   1104
  43.          Width           =   2028
  44.       End
  45.       Begin ListBox tmList 
  46.          BackColor       =   &H00808000&
  47.          FontBold        =   0   'False
  48.          FontItalic      =   0   'False
  49.          FontName        =   "MS Sans Serif"
  50.          FontSize        =   8.25
  51.          FontStrikethru  =   0   'False
  52.          FontUnderline   =   0   'False
  53.          ForeColor       =   &H00000000&
  54.          Height          =   1005
  55.          Left            =   45
  56.          Sorted          =   -1  'True
  57.          TabIndex        =   8
  58.          Top             =   720
  59.          Width           =   1155
  60.       End
  61.       Begin OptionButton showTasks 
  62.          BackColor       =   &H00808000&
  63.          Caption         =   "&Tasks"
  64.          FontBold        =   0   'False
  65.          FontItalic      =   0   'False
  66.          FontName        =   "MS Sans Serif"
  67.          FontSize        =   8.25
  68.          FontStrikethru  =   0   'False
  69.          FontUnderline   =   0   'False
  70.          ForeColor       =   &H00000000&
  71.          Height          =   252
  72.          Left            =   48
  73.          TabIndex        =   32
  74.          Top             =   384
  75.          Value           =   -1  'True
  76.          Width           =   1152
  77.       End
  78.       Begin OptionButton showModules 
  79.          BackColor       =   &H00808000&
  80.          Caption         =   "&Modules"
  81.          FontBold        =   0   'False
  82.          FontItalic      =   0   'False
  83.          FontName        =   "MS Sans Serif"
  84.          FontSize        =   8.25
  85.          FontStrikethru  =   0   'False
  86.          FontUnderline   =   0   'False
  87.          ForeColor       =   &H00000000&
  88.          Height          =   252
  89.          Left            =   48
  90.          TabIndex        =   33
  91.          Top             =   144
  92.          Width           =   1152
  93.       End
  94.       Begin Label tStackUsed 
  95.          Alignment       =   1  'Right Justify
  96.          BackColor       =   &H00808000&
  97.          FontBold        =   0   'False
  98.          FontItalic      =   0   'False
  99.          FontName        =   "MS Sans Serif"
  100.          FontSize        =   8.25
  101.          FontStrikethru  =   0   'False
  102.          FontUnderline   =   0   'False
  103.          Height          =   192
  104.          Left            =   2568
  105.          TabIndex        =   15
  106.          Top             =   1500
  107.          Width           =   672
  108.       End
  109.       Begin Label Label7 
  110.          BackColor       =   &H00808000&
  111.          Caption         =   " Most used:"
  112.          FontBold        =   0   'False
  113.          FontItalic      =   0   'False
  114.          FontName        =   "MS Sans Serif"
  115.          FontSize        =   8.25
  116.          FontStrikethru  =   0   'False
  117.          FontUnderline   =   0   'False
  118.          ForeColor       =   &H00000000&
  119.          Height          =   192
  120.          Left            =   1260
  121.          TabIndex        =   14
  122.          Top             =   1500
  123.          Width           =   900
  124.       End
  125.       Begin Label tStackSize 
  126.          Alignment       =   1  'Right Justify
  127.          BackColor       =   &H00808000&
  128.          FontBold        =   0   'False
  129.          FontItalic      =   0   'False
  130.          FontName        =   "MS Sans Serif"
  131.          FontSize        =   8.25
  132.          FontStrikethru  =   0   'False
  133.          FontUnderline   =   0   'False
  134.          Height          =   192
  135.          Left            =   2568
  136.          TabIndex        =   12
  137.          Top             =   1320
  138.          Width           =   672
  139.       End
  140.       Begin Label Label6 
  141.          BackColor       =   &H00808000&
  142.          Caption         =   "Stack size:"
  143.          FontBold        =   0   'False
  144.          FontItalic      =   0   'False
  145.          FontName        =   "MS Sans Serif"
  146.          FontSize        =   8.25
  147.          FontStrikethru  =   0   'False
  148.          FontUnderline   =   0   'False
  149.          ForeColor       =   &H00000000&
  150.          Height          =   192
  151.          Left            =   1260
  152.          TabIndex        =   11
  153.          Top             =   1320
  154.          Width           =   900
  155.       End
  156.       Begin Label tTaskMemoryBytes 
  157.          Alignment       =   1  'Right Justify
  158.          BackColor       =   &H00808000&
  159.          FontBold        =   0   'False
  160.          FontItalic      =   0   'False
  161.          FontName        =   "MS Sans Serif"
  162.          FontSize        =   8.25
  163.          FontStrikethru  =   0   'False
  164.          FontUnderline   =   0   'False
  165.          Height          =   192
  166.          Left            =   2568
  167.          TabIndex        =   23
  168.          Top             =   1140
  169.          Width           =   672
  170.       End
  171.       Begin Label tTaskMemory 
  172.          Alignment       =   1  'Right Justify
  173.          BackColor       =   &H00808000&
  174.          FontBold        =   0   'False
  175.          FontItalic      =   0   'False
  176.          FontName        =   "MS Sans Serif"
  177.          FontSize        =   8.25
  178.          FontStrikethru  =   0   'False
  179.          FontUnderline   =   0   'False
  180.          Height          =   192
  181.          Left            =   2148
  182.          TabIndex        =   22
  183.          Top             =   1140
  184.          Width           =   372
  185.       End
  186.       Begin Label Label18 
  187.          BackColor       =   &H00808000&
  188.          Caption         =   "GlobalAlloc:"
  189.          FontBold        =   0   'False
  190.          FontItalic      =   0   'False
  191.          FontName        =   "MS Sans Serif"
  192.          FontSize        =   8.25
  193.          FontStrikethru  =   0   'False
  194.          FontUnderline   =   0   'False
  195.          ForeColor       =   &H00000000&
  196.          Height          =   192
  197.          Left            =   1248
  198.          TabIndex        =   21
  199.          Top             =   1152
  200.          Width           =   900
  201.       End
  202.       Begin Label windowClasses 
  203.          Alignment       =   1  'Right Justify
  204.          BackColor       =   &H00808000&
  205.          FontBold        =   0   'False
  206.          FontItalic      =   0   'False
  207.          FontName        =   "MS Sans Serif"
  208.          FontSize        =   8.25
  209.          FontStrikethru  =   0   'False
  210.          FontUnderline   =   0   'False
  211.          Height          =   192
  212.          Left            =   2148
  213.          TabIndex        =   13
  214.          Top             =   900
  215.          Width           =   372
  216.       End
  217.       Begin Label Label2 
  218.          BackColor       =   &H00808000&
  219.          Caption         =   "Classes:"
  220.          FontBold        =   0   'False
  221.          FontItalic      =   0   'False
  222.          FontName        =   "MS Sans Serif"
  223.          FontSize        =   8.25
  224.          FontStrikethru  =   0   'False
  225.          FontUnderline   =   0   'False
  226.          ForeColor       =   &H00000000&
  227.          Height          =   192
  228.          Left            =   1248
  229.          TabIndex        =   7
  230.          Top             =   912
  231.          Width           =   900
  232.       End
  233.       Begin Label referenceCount 
  234.          Alignment       =   1  'Right Justify
  235.          BackColor       =   &H00808000&
  236.          FontBold        =   0   'False
  237.          FontItalic      =   0   'False
  238.          FontName        =   "MS Sans Serif"
  239.          FontSize        =   8.25
  240.          FontStrikethru  =   0   'False
  241.          FontUnderline   =   0   'False
  242.          Height          =   192
  243.          Left            =   2160
  244.          TabIndex        =   38
  245.          Top             =   720
  246.          Width           =   360
  247.       End
  248.       Begin Label Label26 
  249.          BackColor       =   &H00808000&
  250.          Caption         =   "References:"
  251.          FontBold        =   0   'False
  252.          FontItalic      =   0   'False
  253.          FontName        =   "MS Sans Serif"
  254.          FontSize        =   8.25
  255.          FontStrikethru  =   0   'False
  256.          FontUnderline   =   0   'False
  257.          ForeColor       =   &H00000000&
  258.          Height          =   192
  259.          Left            =   1260
  260.          TabIndex        =   37
  261.          Top             =   720
  262.          Width           =   900
  263.       End
  264.       Begin Label codeSegmentBytes 
  265.          Alignment       =   1  'Right Justify
  266.          BackColor       =   &H00808000&
  267.          FontBold        =   0   'False
  268.          FontItalic      =   0   'False
  269.          FontName        =   "MS Sans Serif"
  270.          FontSize        =   8.25
  271.          FontStrikethru  =   0   'False
  272.          FontUnderline   =   0   'False
  273.          Height          =   192
  274.          Left            =   2568
  275.          TabIndex        =   36
  276.          Top             =   540
  277.          Width           =   672
  278.       End
  279.       Begin Label codeSegments 
  280.          Alignment       =   1  'Right Justify
  281.          BackColor       =   &H00808000&
  282.          FontBold        =   0   'False
  283.          FontItalic      =   0   'False
  284.          FontName        =   "MS Sans Serif"
  285.          FontSize        =   8.25
  286.          FontStrikethru  =   0   'False
  287.          FontUnderline   =   0   'False
  288.          Height          =   192
  289.          Left            =   2148
  290.          TabIndex        =   35
  291.          Top             =   540
  292.          Width           =   372
  293.       End
  294.       Begin Label Label20 
  295.          BackColor       =   &H00808000&
  296.          Caption         =   "Code segs:"
  297.          FontBold        =   0   'False
  298.          FontItalic      =   0   'False
  299.          FontName        =   "MS Sans Serif"
  300.          FontSize        =   8.25
  301.          FontStrikethru  =   0   'False
  302.          FontUnderline   =   0   'False
  303.          ForeColor       =   &H00000000&
  304.          Height          =   192
  305.          Left            =   1260
  306.          TabIndex        =   34
  307.          Top             =   540
  308.          Width           =   900
  309.       End
  310.       Begin Label localHeapBytes 
  311.          Alignment       =   1  'Right Justify
  312.          BackColor       =   &H00808000&
  313.          FontBold        =   0   'False
  314.          FontItalic      =   0   'False
  315.          FontName        =   "MS Sans Serif"
  316.          FontSize        =   8.25
  317.          FontStrikethru  =   0   'False
  318.          FontUnderline   =   0   'False
  319.          Height          =   192
  320.          Left            =   2568
  321.          TabIndex        =   19
  322.          Top             =   360
  323.          Width           =   672
  324.       End
  325.       Begin Label localHeap 
  326.          Alignment       =   1  'Right Justify
  327.          BackColor       =   &H00808000&
  328.          FontBold        =   0   'False
  329.          FontItalic      =   0   'False
  330.          FontName        =   "MS Sans Serif"
  331.          FontSize        =   8.25
  332.          FontStrikethru  =   0   'False
  333.          FontUnderline   =   0   'False
  334.          Height          =   192
  335.          Left            =   2148
  336.          TabIndex        =   17
  337.          Top             =   360
  338.          Width           =   372
  339.       End
  340.       Begin Label Label13 
  341.          BackColor       =   &H00808000&
  342.          Caption         =   "Local heap:"
  343.          FontBold        =   0   'False
  344.          FontItalic      =   0   'False
  345.          FontName        =   "MS Sans Serif"
  346.          FontSize        =   8.25
  347.          FontStrikethru  =   0   'False
  348.          FontUnderline   =   0   'False
  349.          ForeColor       =   &H00000000&
  350.          Height          =   192
  351.          Left            =   1260
  352.          TabIndex        =   16
  353.          Top             =   360
  354.          Width           =   900
  355.       End
  356.       Begin Label Label17 
  357.          Alignment       =   2  'Center
  358.          BackColor       =   &H00808000&
  359.          Caption         =   "Bytes"
  360.          FontBold        =   0   'False
  361.          FontItalic      =   0   'False
  362.          FontName        =   "MS Sans Serif"
  363.          FontSize        =   8.25
  364.          FontStrikethru  =   0   'False
  365.          FontUnderline   =   0   'False
  366.          ForeColor       =   &H00000000&
  367.          Height          =   192
  368.          Left            =   2616
  369.          TabIndex        =   20
  370.          Top             =   120
  371.          Width           =   624
  372.       End
  373.       Begin Label Label16 
  374.          Alignment       =   2  'Center
  375.          BackColor       =   &H00808000&
  376.          Caption         =   "#"
  377.          FontBold        =   0   'False
  378.          FontItalic      =   0   'False
  379.          FontName        =   "MS Sans Serif"
  380.          FontSize        =   8.25
  381.          FontStrikethru  =   0   'False
  382.          FontUnderline   =   0   'False
  383.          ForeColor       =   &H00000000&
  384.          Height          =   192
  385.          Left            =   2196
  386.          TabIndex        =   18
  387.          Top             =   120
  388.          Width           =   324
  389.       End
  390.    End
  391.    Begin CommandButton getSample 
  392.       BackColor       =   &H00808000&
  393.       Caption         =   "&Sample"
  394.       FontBold        =   0   'False
  395.       FontItalic      =   0   'False
  396.       FontName        =   "MS Sans Serif"
  397.       FontSize        =   8.25
  398.       FontStrikethru  =   0   'False
  399.       FontUnderline   =   0   'False
  400.       Height          =   330
  401.       Left            =   2400
  402.       TabIndex        =   1
  403.       Top             =   1020
  404.       Width           =   870
  405.    End
  406.    Begin CheckBox autoSample 
  407.       BackColor       =   &H00808000&
  408.       Caption         =   "&Auto"
  409.       FontBold        =   0   'False
  410.       FontItalic      =   0   'False
  411.       FontName        =   "MS Sans Serif"
  412.       FontSize        =   8.25
  413.       FontStrikethru  =   0   'False
  414.       FontUnderline   =   0   'False
  415.       ForeColor       =   &H00000000&
  416.       Height          =   255
  417.       Left            =   2520
  418.       TabIndex        =   0
  419.       Top             =   660
  420.       Width           =   630
  421.    End
  422.    Begin Timer sampleTimer 
  423.       Enabled         =   0   'False
  424.       Interval        =   10000
  425.       Left            =   2640
  426.       Top             =   60
  427.    End
  428.    Begin Label freeDOSMemory 
  429.       Alignment       =   1  'Right Justify
  430.       BackColor       =   &H00808000&
  431.       FontBold        =   0   'False
  432.       FontItalic      =   0   'False
  433.       FontName        =   "MS Sans Serif"
  434.       FontSize        =   8.25
  435.       FontStrikethru  =   0   'False
  436.       FontUnderline   =   0   'False
  437.       Height          =   195
  438.       Left            =   1320
  439.       TabIndex        =   41
  440.       Top             =   1260
  441.       Width           =   915
  442.    End
  443.    Begin Label Label8 
  444.       BackColor       =   &H00808000&
  445.       Caption         =   "Free DOS mem:"
  446.       FontBold        =   0   'False
  447.       FontItalic      =   0   'False
  448.       FontName        =   "MS Sans Serif"
  449.       FontSize        =   8.25
  450.       FontStrikethru  =   0   'False
  451.       FontUnderline   =   0   'False
  452.       ForeColor       =   &H00000000&
  453.       Height          =   195
  454.       Left            =   60
  455.       TabIndex        =   40
  456.       Top             =   1260
  457.       Width           =   1275
  458.    End
  459.    Begin Label memoryInUse 
  460.       Alignment       =   1  'Right Justify
  461.       BackColor       =   &H00808000&
  462.       FontBold        =   0   'False
  463.       FontItalic      =   0   'False
  464.       FontName        =   "MS Sans Serif"
  465.       FontSize        =   8.25
  466.       FontStrikethru  =   0   'False
  467.       FontUnderline   =   0   'False
  468.       Height          =   195
  469.       Left            =   1320
  470.       TabIndex        =   31
  471.       Top             =   1080
  472.       Width           =   915
  473.    End
  474.    Begin Label Label23 
  475.       BackColor       =   &H00808000&
  476.       Caption         =   "Memory in use:"
  477.       FontBold        =   0   'False
  478.       FontItalic      =   0   'False
  479.       FontName        =   "MS Sans Serif"
  480.       FontSize        =   8.25
  481.       FontStrikethru  =   0   'False
  482.       FontUnderline   =   0   'False
  483.       ForeColor       =   &H00000000&
  484.       Height          =   195
  485.       Left            =   60
  486.       TabIndex        =   28
  487.       Top             =   1080
  488.       Width           =   1275
  489.    End
  490.    Begin Label freeMemory 
  491.       Alignment       =   1  'Right Justify
  492.       BackColor       =   &H00808000&
  493.       FontBold        =   0   'False
  494.       FontItalic      =   0   'False
  495.       FontName        =   "MS Sans Serif"
  496.       FontSize        =   8.25
  497.       FontStrikethru  =   0   'False
  498.       FontUnderline   =   0   'False
  499.       Height          =   195
  500.       Left            =   1320
  501.       TabIndex        =   30
  502.       Top             =   900
  503.       Width           =   915
  504.    End
  505.    Begin Label Label22 
  506.       BackColor       =   &H00808000&
  507.       Caption         =   "Free memory:"
  508.       FontBold        =   0   'False
  509.       FontItalic      =   0   'False
  510.       FontName        =   "MS Sans Serif"
  511.       FontSize        =   8.25
  512.       FontStrikethru  =   0   'False
  513.       FontUnderline   =   0   'False
  514.       ForeColor       =   &H00000000&
  515.       Height          =   195
  516.       Left            =   60
  517.       TabIndex        =   27
  518.       Top             =   900
  519.       Width           =   1275
  520.    End
  521.    Begin Label maxFreeBlock 
  522.       Alignment       =   1  'Right Justify
  523.       BackColor       =   &H00808000&
  524.       FontBold        =   0   'False
  525.       FontItalic      =   0   'False
  526.       FontName        =   "MS Sans Serif"
  527.       FontSize        =   8.25
  528.       FontStrikethru  =   0   'False
  529.       FontUnderline   =   0   'False
  530.       Height          =   195
  531.       Left            =   1320
  532.       TabIndex        =   29
  533.       Top             =   720
  534.       Width           =   915
  535.    End
  536.    Begin Label Label21 
  537.       BackColor       =   &H00808000&
  538.       Caption         =   "Max free block:"
  539.       FontBold        =   0   'False
  540.       FontItalic      =   0   'False
  541.       FontName        =   "MS Sans Serif"
  542.       FontSize        =   8.25
  543.       FontStrikethru  =   0   'False
  544.       FontUnderline   =   0   'False
  545.       ForeColor       =   &H00000000&
  546.       Height          =   195
  547.       Left            =   60
  548.       TabIndex        =   26
  549.       Top             =   720
  550.       Width           =   1275
  551.    End
  552.    Begin Label totalMemory 
  553.       Alignment       =   1  'Right Justify
  554.       BackColor       =   &H00808000&
  555.       FontBold        =   0   'False
  556.       FontItalic      =   0   'False
  557.       FontName        =   "MS Sans Serif"
  558.       FontSize        =   8.25
  559.       FontStrikethru  =   0   'False
  560.       FontUnderline   =   0   'False
  561.       Height          =   195
  562.       Left            =   1320
  563.       TabIndex        =   25
  564.       Top             =   540
  565.       Width           =   915
  566.    End
  567.    Begin Label Label19 
  568.       BackColor       =   &H00808000&
  569.       Caption         =   "Total memory:"
  570.       FontBold        =   0   'False
  571.       FontItalic      =   0   'False
  572.       FontName        =   "MS Sans Serif"
  573.       FontSize        =   8.25
  574.       FontStrikethru  =   0   'False
  575.       FontUnderline   =   0   'False
  576.       ForeColor       =   &H00000000&
  577.       Height          =   195
  578.       Left            =   60
  579.       TabIndex        =   24
  580.       Top             =   540
  581.       Width           =   1275
  582.    End
  583.    Begin Label classCount 
  584.       Alignment       =   1  'Right Justify
  585.       BackColor       =   &H00808000&
  586.       FontBold        =   0   'False
  587.       FontItalic      =   0   'False
  588.       FontName        =   "MS Sans Serif"
  589.       FontSize        =   8.25
  590.       FontStrikethru  =   0   'False
  591.       FontUnderline   =   0   'False
  592.       Height          =   195
  593.       Left            =   1320
  594.       TabIndex        =   3
  595.       Top             =   360
  596.       Width           =   915
  597.    End
  598.    Begin Label Label1 
  599.       BackColor       =   &H00808000&
  600.       Caption         =   "Window classes:"
  601.       FontBold        =   0   'False
  602.       FontItalic      =   0   'False
  603.       FontName        =   "MS Sans Serif"
  604.       FontSize        =   8.25
  605.       FontStrikethru  =   0   'False
  606.       FontUnderline   =   0   'False
  607.       ForeColor       =   &H00000000&
  608.       Height          =   195
  609.       Left            =   60
  610.       TabIndex        =   2
  611.       Top             =   360
  612.       Width           =   1275
  613.    End
  614.    Begin Label taskCount 
  615.       Alignment       =   1  'Right Justify
  616.       BackColor       =   &H00808000&
  617.       FontBold        =   0   'False
  618.       FontItalic      =   0   'False
  619.       FontName        =   "MS Sans Serif"
  620.       FontSize        =   8.25
  621.       FontStrikethru  =   0   'False
  622.       FontUnderline   =   0   'False
  623.       Height          =   195
  624.       Left            =   1320
  625.       TabIndex        =   10
  626.       Top             =   180
  627.       Width           =   915
  628.    End
  629.    Begin Label Label5 
  630.       BackColor       =   &H00808000&
  631.       Caption         =   "Tasks:"
  632.       FontBold        =   0   'False
  633.       FontItalic      =   0   'False
  634.       FontName        =   "MS Sans Serif"
  635.       FontSize        =   8.25
  636.       FontStrikethru  =   0   'False
  637.       FontUnderline   =   0   'False
  638.       ForeColor       =   &H00000000&
  639.       Height          =   195
  640.       Left            =   60
  641.       TabIndex        =   9
  642.       Top             =   180
  643.       Width           =   1275
  644.    End
  645.    Begin Label moduleCount 
  646.       Alignment       =   1  'Right Justify
  647.       BackColor       =   &H00808000&
  648.       FontBold        =   0   'False
  649.       FontItalic      =   0   'False
  650.       FontName        =   "MS Sans Serif"
  651.       FontSize        =   8.25
  652.       FontStrikethru  =   0   'False
  653.       FontUnderline   =   0   'False
  654.       Height          =   195
  655.       Left            =   1320
  656.       TabIndex        =   5
  657.       Top             =   0
  658.       Width           =   915
  659.    End
  660.    Begin Label Label3 
  661.       BackColor       =   &H00808000&
  662.       Caption         =   "Modules:"
  663.       FontBold        =   0   'False
  664.       FontItalic      =   0   'False
  665.       FontName        =   "MS Sans Serif"
  666.       FontSize        =   8.25
  667.       FontStrikethru  =   0   'False
  668.       FontUnderline   =   0   'False
  669.       ForeColor       =   &H00000000&
  670.       Height          =   195
  671.       Left            =   60
  672.       TabIndex        =   4
  673.       Top             =   0
  674.       Width           =   1275
  675.    End
  676. Sub autoSample_Click ()
  677.   If autoSample.value = 1 Then
  678.     sampleTimer.enabled = -1
  679.   Else
  680.     sampleTimer.enabled = 0
  681.   End If
  682. End Sub
  683. Sub Form_Load ()
  684.   hTMList = 0
  685.   screen.mousePointer = 11
  686.   maForm.left = 0
  687.   maForm.top = 0
  688.   Call retrieveData
  689.   screen.mousePointer = 0
  690. End Sub
  691. Sub getSample_Click ()
  692.   Call retrieveData
  693. End Sub
  694. Function LOWORD (dw&) As Integer
  695.   dw2& = dw& / 65536
  696.   dw2& = dw2& * 65536
  697.   LOWORD = (dw& - dw2&)
  698. End Function
  699. Function makeLong (ByVal i%) As Long
  700.   If i% < 0 Then
  701.     makeLong = CLng(32767) + (CLng(32769) + CLng(i%))
  702.   Else
  703.     makeLong = CLng(i%)
  704.   End If
  705. End Function
  706. Sub retrieveData ()
  707.   Dim ce As sCLASSENTRY
  708.   Dim te As sTASKENTRY
  709.   Dim me As sMODULEENTRY
  710.   Dim mi As sMEMMANINFO
  711.   mOld = screen.mousePointer
  712.   screen.mousePointer = 11
  713.   iDos% = 0
  714.   dwDos& = 0
  715.   dw& = GlobalDOSAlloc(4096)
  716.   While dw& <> 0 And iDos% < MAX_DOSALLOCS
  717.     ahDosMem(iDos%) = LOWORD(dw&)
  718.     iDos% = iDos% + 1
  719.     dwDos& = dwDos& + 4096
  720.     dw& = GlobalDOSAlloc(4096)
  721.   Wend
  722.   While iDos% <> 0
  723.     iDos% = iDos% - 1
  724.     x% = GlobalDosFree(ahDosMem(iDos%))
  725.   Wend
  726.   freeDOSMemory.caption = Str$(dwDos&)
  727.   iListItem% = tmList.listIndex
  728.   If iListItem% <> -1 Then
  729.     tmItem$ = tmList.list(iListItem%)
  730.   Else
  731.     tmItem$ = ""
  732.   End If
  733.   iClassCount% = 0
  734.   ce.dwSize = Len(ce)
  735.   r% = ClassFirst(ce)
  736.   While r% <> 0
  737.     iClassCount% = iClassCount% + 1
  738.     r% = ClassNext(ce)
  739.   Wend
  740.   classCount.caption = Str$(iClassCount%)
  741.   If tmList.listCount > 0 Then
  742.     If hTMList = 0 Then
  743.       tmList.SetFocus
  744.       hTMList = getFocus()
  745.     End If
  746.     If hTMList <> 0 Then
  747.       l% = SendMessage(hTMList, LB_RESETCONTENT, 0, 0)
  748.     End If
  749.   End If
  750.   iTaskCount% = 0
  751.   te.dwSize = Len(te)
  752.   r% = TaskFirst(te)
  753.   While r% <> 0
  754.     iTaskCount% = iTaskCount% + 1
  755.     If showTasks.value = -1 Then
  756.       tmList.AddItem LCase$(RTrim$(te.szModule))
  757.     End If
  758.     r% = TaskNext(te)
  759.   Wend
  760.   taskCount.caption = LTrim$(Str$(iTaskCount%))
  761.   iModuleCount% = 0
  762.   me.dwSize = Len(me)
  763.   r% = ModuleFirst(me)
  764.   While r% <> 0
  765.     iModuleCount% = iModuleCount% + 1
  766.     If showModules.value = -1 Then
  767.       tmList.AddItem LCase$(RTrim$(me.szModule))
  768.     End If
  769.     r% = ModuleNext(me)
  770.   Wend
  771.   moduleCount.caption = Str$(iModuleCount%)
  772.   mi.dwSize = Len(mi)
  773.   x% = MemManInfo(mi)
  774.   totalMemory.caption = LTrim$(Str$(mi.dwTotalLinearSpace * mi.wPageSize))
  775.   maxFreeBlock.caption = LTrim$(Str$(mi.dwLargestFreeBlock))
  776.   freeMemory.caption = LTrim$(Str$(mi.dwFreeLinearSpace * mi.wPageSize))
  777.   memoryInUse.caption = LTrim$(Str$(Val(totalMemory.caption) - Val(freeMemory.caption)))
  778.   If tmItem$ <> "" Then
  779.     For i% = 0 To tmList.listCount
  780.       If tmItem$ = tmList.list(i%) Then
  781.         tmList.listIndex = i%
  782.       End If
  783.     Next i%
  784.   End If
  785.   Call retrieveTaskModule
  786.   screen.mousePointer = mOld
  787. End Sub
  788. Sub retrieveTaskModule ()
  789.   Dim ce As sCLASSENTRY
  790.   Dim te As sTASKENTRY
  791.   Dim ge As sGLOBALENTRY
  792.   Dim li As sLOCALINFO
  793.   Dim le As sLOCALENTRY
  794.   Dim me As sMODULEENTRY
  795.   mOld = screen.mousePointer
  796.   screen.mousePointer = 11
  797.   tStackSize.caption = ""
  798.   windowClasses.caption = ""
  799.   tStackUsed.caption = ""
  800.   localHeap.caption = ""
  801.   localHeapBytes.caption = ""
  802.   referenceCount.caption = ""
  803.   codeSegments.caption = ""
  804.   codeSegmentBytes.caption = ""
  805.   tTaskMemory.caption = ""
  806.   tTaskMemoryBytes.caption = ""
  807.   If tmList.text <> "" Then
  808.     te.dwSize = Len(te)
  809.     ce.dwSize = Len(ce)
  810.     ge.dwSize = Len(ge)
  811.     li.dwSize = Len(li)
  812.     le.dwSize = Len(le)
  813.     me.dwSize = Len(me)
  814.     hMod% = 0
  815.     hTask% = 0
  816.     r% = TaskFirst(te)
  817.     While r% <> 0
  818.       If strcmp(tmList.text, LCase$(RTrim$(te.szModule))) = 0 Then
  819.         b& = makeLong(te.wStackBottom)
  820.         t& = makeLong(te.wStackTop)
  821.         m& = makeLong(te.wStackMinimum)
  822.         tStackSize.caption = Str$(b& - t&)
  823.         tStackUsed.caption = Str$(b& - m&)
  824.         hMod% = te.hModule 'not hInst...
  825.         hTask% = te.hTask
  826.         r% = 0
  827.       Else
  828.         r% = TaskNext(te)
  829.       End If
  830.     Wend
  831.     r% = ModuleFirst(me)
  832.     While r% <> 0
  833.       If strcmp(tmList.text, LCase$(RTrim$(me.szModule))) = 0 Then
  834.         If hMod% = 0 Then
  835.           hMod% = me.hModule 'not hInst...
  836.         End If
  837.         referenceCount.caption = Str$(me.wUsageFlags)
  838.         r% = 0
  839.       Else
  840.         r% = ModuleNext(me)
  841.       End If
  842.     Wend
  843.     If hMod% <> 0 Then
  844.       iClasses% = 0
  845.       r% = ClassFirst(ce)
  846.       While r% <> 0
  847.         If ce.hInst = hMod% Then
  848.           iClasses% = iClasses% + 1
  849.         End If
  850.         r% = ClassNext(ce)
  851.       Wend
  852.       windowClasses.caption = Str$(iClasses%)
  853.       taskMem& = 0
  854.       taskAllocs% = 0
  855.       codeCount% = 0
  856.       codeBytes& = 0
  857.       r% = GlobalFirst(ge, GLOBAL_ALL)
  858.       While r% <> 0
  859.         If ge.hOwner = hMod% Then
  860.           Select Case ge.wType
  861.             Case GT_CODE
  862.               codeCount% = codeCount% + 1
  863.               codeBytes& = codeBytes& + ge.dwBlockSize
  864.             Case GT_DGROUP
  865.               b& = 0
  866.               c& = 0
  867.               If ge.wHeapPresent = 1 Then
  868.                 x% = LocalInfo(li, ge.hBlock)
  869.                 q% = LocalFirst(le, ge.hBlock)
  870.                 While q% <> 0
  871.                   If le.wFlags <> LF_FREE Then
  872.                     c& = c& + 1
  873.                     b& = b& + makeLong(le.wSize)
  874.                   End If
  875.                   q% = LocalNext(le)
  876.                 Wend
  877.                 localHeap.caption = LTrim$(Str$(c&))
  878.                 localHeapBytes.caption = LTrim$(Str$(b&))
  879.               End If
  880.           End Select
  881.         ElseIf ge.hOwner = hTask% Then
  882.           taskMem& = taskMem& + ge.dwBlockSize
  883.           taskAllocs% = taskAllocs% + 1
  884.         End If
  885.         r% = GlobalNext(ge, GLOBAL_ALL)
  886.       Wend
  887.       If localHeapBytes.caption = "" Then
  888.         localHeap.caption = ""
  889.         localHeapBytes.caption = ""
  890.       End If
  891.       If hTask% <> 0 Then
  892.         tTaskMemory.caption = LTrim$(Str$(taskAllocs%))
  893.         tTaskMemoryBytes.caption = LTrim$(Str$(taskMem&))
  894.       End If
  895.       codeSegments.caption = LTrim$(Str$(codeCount%))
  896.       codeSegmentBytes.caption = LTrim$(Str$(codeBytes&))
  897.     End If
  898.   End If
  899.   screen.mousePointer = mOld
  900. End Sub
  901. Sub sampleTimer_Timer ()
  902.   Call retrieveData
  903. End Sub
  904. Sub showModules_Click ()
  905.   Call retrieveData
  906. End Sub
  907. Sub showTasks_Click ()
  908.   Call retrieveData
  909. End Sub
  910. Function strcmp (ByVal s1$, ByVal s2$) As Integer
  911.   l = Len(s1$)
  912.   If Left$(s1$, l) = Left$(s2$, l) Then
  913.     strcmp = 0
  914.   Else
  915.     strcmp = 1
  916.   End If
  917. End Function
  918. Sub tmList_Click ()
  919.   Call retrieveTaskModule
  920. End Sub
  921.